package com.example.strategy.promotion;


public class Test {
    public static void main(String[] args) {

        // 通过策略上下文的方式实现
//        PromotionActivity activity = new PromotionActivity(new GroupbuyStrategy());
//        activity.execute();

        // 获取到所有策略的key对用户暴露
        PromotionStrategyFacory.getPromotionKeys();
        String promotionKey = "COUPON";

        IPromotionStrategy promotionStrategy = PromotionStrategyFacory.getPromotionStrategy(promotionKey);
        promotionStrategy.doPromotion();
    }
}
